<h2>Create multiple users</h2>
<%= form_tag(create_all_users_path, class: 'form-horizontal') do %>
    <%= div_if notice, class: "alert alert-dismissable alert-success" do %>
        <button type="button" class="close" data-dismiss="alert">×</button>
        <%= notice %>
    <% end %>
    <%= div_if(alert && alert.any?, class: "alert alert-dismissable alert-warning") do %>
        <button type="button" class="close" data-dismiss="alert">×</button>
        <% alert.each do |line, messages| %>
           <% messages.each do |message| %>
              <%= message %> : <%= line %><br/>
           <% end %>
        <% end %>
    <% end %>
    <fieldset>
      <div class="form-group">
        <%= label_tag :users, nil, class: 'col-lg-2 control-label', title: "foo,foo@bar.com\r\nbaz@qux.com" %>
        <div class="col-lg-10">
          <%= text_area_tag :users, nil, class: 'form-control', rows: 30, placeholder: 'foo,foo@bar.com' %>
        </div>
      </div>
      <div class="form-group">
        <div class="col-lg-10 col-lg-offset-2">
          <div class="checkbox">
            <label>
              <%= check_box_tag :email_valid %>
              Email valid
            </label>
          </div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-lg-10 col-lg-offset-2">
          <div class="checkbox">
            <label>
              <%= check_box_tag :subscribe %>
              Subscribe
            </label>
          </div>
        </div>
      </div>
      <div class="form-group">
        <%= label_tag :user_group_id, nil, class: 'col-lg-2 control-label' %>
        <div class="col-lg-9">
          <%= collection_select :user_group_id, nil, @user_groups, :id, :name, {}, class: 'form-control' %>
        </div>
        <div class="col-lg-1">
          <a id="add_user_group"
              href="javascript:void(0)"
              class="btn btn-info"
              data-container="body"
              data-toggle="popover"
              data-placement="left"
              data-html="true"
              data-content='<%= @popover %>'
              data-original-title=""
              title="">
            <i class="fa fa-plus fa-lg"></i>
          </a>
        </div>
      </div>
      <div class="form-group">
        <%= label_tag :last_sign_in, nil, class: 'col-lg-2 control-label' %>
        <div class="col-lg-10">
          <div class="input-group date datetime-picker" data-date-format="YYYY-MM-DD HH:mm:ss">
            <!--<input type='text' class="form-control" />-->
            <%= text_field_tag :last_sign_in, nil, class: 'form-control' %>
            <span class="input-group-addon">
              <span class="fa fa-calendar"></span>
            </span>
          </div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-lg-10 col-lg-offset-2">
          <%= submit_tag 'Create all', class: 'btn btn-primary' %>
        </div>
      </div>
    </fieldset>
<% end %>